// packageH/project_verification/components/projectLR/projectLR.js
Component({
  options: {
    multipleSlots: true,
  },
  /**
   * 组件的属性列表
   */
  properties: {
    showTimes: {
      type: Boolean,
      value: false,
    },
    data: {
      type: Object,
    },
    simple: {
      type: Boolean,
      value: false,
    },
    golden: {
      type: Boolean,
      value: false,
    },
    details: {
      type: Boolean,
      value: true,
    },
    model: {
      type: String,
      value: '0',
    },
    WriteOffRecord:{
      type: String,
      value:""
    }
  },
  /**
   * 组件的初始数据
   */
  data: {
    projectExpireAppendClassName: "",
  },
  lifetimes: {
    ready() {
      if (this.data.data.near_ending !== undefined) {
        let className = "project-expire_blue";
        if (this.data.data.near_ending) {
          className = "project-expire_red";
        }
        this.setData({
          projectExpireAppendClassName: className,
        });
      }
    },
  },

  /**
   * 组件的方法列表
   */
  methods: {
    toWriteOffRecord_evaluate(e) {
      let {
        id,
        key
      } = e.currentTarget.dataset;
      if (key == 'look') {
        wx.navigateTo({
          url: '/packageH/project_verification/WriteOffRecord_evaluate/WriteOffRecord_evaluate?id=' + id + '&look=1',
        })
        return
      }
      wx.navigateTo({
        url: '/packageH/project_verification/WriteOffRecord_evaluate/WriteOffRecord_evaluate?id=' + id,
      })
    }
  },
});